using SumerCoreDevOps.Shared.Enums;

namespace SumerCoreDevOps.Shared.Models.Messages;

/// <summary>
/// 步骤状态上报消息
/// </summary>
public class StepStatusReportMessage
{
    /// <summary>
    /// 任务ID
    /// </summary>
    public long TaskId { get; set; }

    /// <summary>
    /// 步骤ID
    /// </summary>
    public long StepId { get; set; }

    /// <summary>
    /// 任务状态
    /// </summary>
    public Enums.TaskStatus Status { get; set; }

    /// <summary>
    /// 进度（0-100）
    /// </summary>
    public int Progress { get; set; }

    /// <summary>
    /// 错误信息（失败时）
    /// </summary>
    public string? ErrorMessage { get; set; }

    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? StartTime { get; set; }

    /// <summary>
    /// 结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }

    /// <summary>
    /// 输出上下文（可传递给下一步）
    /// </summary>
    public Dictionary<string, string> OutputContext { get; set; } = [];
}
